package com.factory.rental.repository;

import com.factory.rental.model.CleaningRecord;
import com.factory.rental.model.Room;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface CleaningRecordRepository extends JpaRepository<CleaningRecord, Long> {
    List<CleaningRecord> findByRoom(Room room);
    List<CleaningRecord> findByCleanerId(String cleanerId);
    List<CleaningRecord> findByStatus(CleaningRecord.CleaningStatus status);
    List<CleaningRecord> findByStartTimeBetween(LocalDateTime start, LocalDateTime end);
}